//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "aisuppress\fn_preinit.sqf"
#include <core_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

GVAR(DEBUG_SPHERE) = false;
GVAR(DEBUG_MOVE) = false;
GVAR(DEBUG_FSM) = false;

GVAR(ObjectStore) = objNull;

GVAR(MAX_TIME_BETWEEN_BULLETS) = 4;
GVAR(MIN_BULLET_FOR_SUPP) = 3;
GVAR(MIN_BULLET_FOR_FLEE) = 6;
GVAR(MIN_BULLET_FOR_PRONE) = 12;

GVAR(MAX_BULLET_DIST_FOR_SUPP) = 7;
GVAR(AI_SUPPRESSION_LIST) = [];
GVAR(BULLETS_REMEMBER_TIMEOUT) = 90; // Time from which a bullet is part of another salvo and we start from 0
GVAR(STATE_CHANGE_TIMEOUT) = 30;
GVAR(BULLETS_HANDLING_TIMEOUT) = 120; // Time after the unit returns to a normal behaviour

GVAR(COVER_DISTANCE) = 30;

GVAR(MIN_FPS) = 20;

// Possible improvement:
// bdetect_units_kindof limit this to only enemy units by checking playerSide and selecting SoldierEB / SoldierGB accordingly to friendly sides


if (isServer) then {
	GVAR(BDETECT_PVEH);
};

if (!isDedicated) then {
	bdetect_callback = QUOTE(FUNC(bDetected));
	bdetect_debug_enable = false;
	bdetect_startup_hint = false;
	bdetect_callback_mode = "call";
	bdetect_bullet_max_proximity = GVAR(MAX_BULLET_DIST_FOR_SUPP);
	bdetect_bullet_max_distance = 1500;
	bdetect_bullet_max_lifespan = 2;
	bdetect_bullet_max_height = 10;
	bdetect_bullet_max_proximity = 10;
	bdetect_mp_enable = false;
	bdetect_mp_per_frame_native_163beta = true;
	bdetect_fps_min = GVAR(MIN_FPS);
	call compileFinal preprocessFileLineNumbers "tmf\support\modules\aisuppress\overrides.sqf";
};

TRACE("End");
TMFPROFILERSTOP;
